home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
FILEUTIL
/
STARTUP
/
ReadMe
next >
Wrap
Text File
|
1992-01-26
|
4KB
|
97 lines
StartUp 0.04
------------
Quite a useful little utility this, even if I do say so myself. A friend of
mine wanted to be able to open a Cfs filer window on boot up, but doing a
Filer_OpenDir in his Boot file after a Run !Cfs didn't work, the filer
hadn't been started up yet.
[Actually entirely false, thinking about it it wouldn't matter if the filer
hadn't started up and I managed to open a CFSread filer window in my boot
file, one may never know what he was doing]
He wanted to execute * commands IN the desktop automatically, so I wrote
this, which I use myself for my !Boot file, so the desktop is active while
everything sets itself up, especially Pinboard !
StartUp itself is a task, but is much more suited to the Library rather
than a Apps directory, once there you can have in your boot file something
like:
Desktop *StartUp -+adfs::Hippo.!BootTasks -cache -cmdtime 4
The - is to mark a parameter, a parameter without a name is taken as the
command or file of commands (a file of commands is marked with a +, else it
is taken as a single command).
If the command contains spaces or only contains letters (in which case the
GetArgs routine things it is a seperate parameter) then surround it in
quotes.
Other parameters are:
-pause sets the time delay between commands in cs. The pause is taken
first, so the command (or first of commands for a file) is only started
after the delay.
-perpoll specifies what the minimum number of commands to perform per poll
is. For a single command, the command is repeated that number of times,
regardless of the -repeat parameter.
-repeat means to repeat the command or file of commands indefinately and
not to quit the task when it gets to the end.
-cmdtime specifies the minimum time the commands (this is only applicable
to command files) will be called for. If -perpoll is specfied aswell, then
the perpoll value is taken first and then the time limit is checked. (ie.
the commands are executed until the perpoll minimum and then the time limit
is checked and then it returns to Wimp_Poll if the time limit is up).
-oscli specifies that the command(s) should be sent to OS_CLI, normally the
command(s) are passed to Wimp_StartTask so they are treated as separate
tasks themselves. Note if they are passed to OS_CLI they are executed in the
StartUp task space.
-cache specifies that if a command file is used that is loaded into memory
and acted upon there, else the file is opened as a file and bytes read as
normal.
Once the command (or the file of commands) has come to an end, the StartUp
task quits itself, unless the -repeat parameter is specified.
You can call StartUp itself from a previous StartUp task, thus spurning off
another set of commands.
As an example, the line above starts off my task loading, and setting up
various things, and somewhere in that file while installing tasks it starts
off another StartUp task to install Pinboard, with a slight delay so I can
use the desktop normally while it works its way through all the icons.
..............
..............
Run adfs::Hippo.$.Apps.!Menon
Run resources:$.Apps.!Alarm Alarms
Run adfs::Hippo.$.DDE.!Make
Run adfs::Hippo.$.DDE.!SrcEdit
startup -+adfs::Hippo.Pinboard -pause 10 -cache -oscli
Set Reader$Replies adfs::Hippo.Dload
Set Edit$Options f0 b7 l1 m2 h12 w12 a80
..............
..............
Ideally you wouldn't want everything to startup under this mechanism, as it
can take a while longer, so you would have the above file running normally,
but the Pinboard starting up with StartUp.
(c)1992 G.W.Babb
Normal copyright stuff applies, you can distribute where you want aslong as
it isn't for profit. You must distribute as-is, though the source is
included for your enjoyment, which you may expand upon and distribute as you
please.